﻿using System.Drawing;

namespace HealthExamination.HardwareDrivers.Models.IdCardReader
{
    /// <summary>
    /// 证件基类
    /// </summary>
    public class Card
    {
        /// <summary>
        /// 证件类别
        /// </summary>
        /// <remarks>
        /// 身份证返回值为空，外国人永居证返回值为“I”,港澳台居民居住证返回值为“J”
        /// </remarks>
        public string CertType { get; set; }

        /// <summary>
        /// 姓名
        /// <para>英文姓名</para>
        /// </summary>
        /// <remarks>
        /// 姓名
        /// <para>不超过30字节</para>
        /// <para>外国人英文姓名</para>
        /// <para>不超过120字节</para>
        /// </remarks>
        public string Name { get; set; }

        /// <summary>
        /// 性别
        /// </summary>
        /// <remarks>
        /// 性别
        /// <para>外国人性别</para>
        /// <para>不超过2个字节，符合GB/T 2261.1的规定</para>
        /// </remarks>
        public string Sex { get; set; }

        /// <summary>
        /// 性别代码
        /// </summary>
        public string SexCode { get; set; }


        /// <summary>
        /// 出生日期
        /// </summary>
        /// <remarks>
        /// 出生日期
        /// <para>不超过16个字节，格式为YYMMDD</para>
        /// </remarks>
        public string Birthday { get; set; }

        /// <summary>
        /// 公民身份证号码
        /// <para>永久居留证号码</para>
        /// </summary>
        /// <remarks>
        /// 证件号码
        /// <para>不超过36个字节，或18个unicode字符</para>
        /// <para>不超过30个字节，或15个unicode字符</para>
        /// </remarks>
        public string IdCardNo { get; set; }

        /// <summary>
        /// 签发机关
        /// <para>受理机关代码</para>
        /// </summary>
        /// <remarks>
        /// 签发机关
        /// <para>不超过30字节</para>
        /// <para>当次申请受理机关代码</para>
        /// <para>不超过8个字节</para>
        /// </remarks>
        public string Department { get; set; }

        /// <summary>
        /// 有效期起始日期
        /// <para>证件签发日期</para>
        /// </summary>
        /// <remarks>
        /// 有效期起始日期
        /// <para>证件签发日期</para>
        /// <para>不超过16个字节，格式为YYMMDD</para>
        /// </remarks>
        public string ValidtermOfStart { get; set; }

        /// <summary>
        /// 有效期终止日期
        /// <para>证件终止日期</para>
        /// </summary>
        /// <remarks>
        /// 有效期终止日期
        /// <para>证件终止日期</para>
        /// <para>不超过16个字节，格式为YYMMDD</para>
        /// </remarks>
        public string ValidtermOfEnd { get; set; }

        /// <summary>
        /// 照片内容
        /// </summary>
        /// <remarks>
        /// 照片内容
        /// <para>若取得bmp数据，则不超过38862字节，jpg数据长度可变</para>
        /// </remarks>
        public Image Photo { get; set; }

        /// <summary>
        /// 安全模块号
        /// </summary>
        public string SamId { get; set; }
    }
}